package com.duojuhe.coremodule.help.pojo.dto.info;

import com.duojuhe.common.bean.PageHead;
import com.duojuhe.common.utils.dateutils.DateUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;


@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class QueryMyHelpInfoPageReq extends PageHead {
    @ApiModelProperty(value = "帮助所属分类id", required = true)
    private String categoryId;

    @ApiModelProperty(value = "帮助所属分类名称", required = true)
    private String categoryName;

    @ApiModelProperty(value = "帮助标题", required = true)
    private String infoTitle;

    @ApiModelProperty(value = "帮助简介")
    private String introduction;

    @ApiModelProperty(value = "帮助内容")
    private String infoContent;

    @ApiModelProperty(value = "开始日期yyyy-MM-dd", example = "2018-11-01")
    private Date startTime;

    @ApiModelProperty(value = "结束日期yyyy-MM-dd", example = "2018-11-10")
    private Date endTime;

    public void setEndTime(Date endTime) {
        this.endTime = DateUtils.toLastSecond(endTime);
    }
}